package com.matt.malltinylombok.example;

import lombok.SneakyThrows;

import java.io.UnsupportedEncodingException;

/**
 * SneakThrowsExample
 * Created by jiachun.lu on 2025/02/10.
 */
public class SneakThrowsExample {

    @SneakyThrows(UnsupportedEncodingException.class)
    public static byte[] str2byte(String str) {
        return str.getBytes("UTF-8");
    }

    public static void main(String[] args) {
        String str = "Hello World!";
        System.out.println(str2byte(str));
    }
}
